import http from '@/utils/http'


// 地址列表
export const getAddressListAPI=() =>{
  return http.get('/api/addresses')
}
// /添加地址

export const addAddressAPI=(address:any) =>{
  return http.post('/api/addresses',{
    address
  })
}




// 删除地址
export const deleteAddressAPI=(id:any) =>{
  return http.delete(`/api/addresses/${id}`)
}

//更新地址
export const updateAddressAPI=(address:any) =>{
 
  return http.put(`/api/addresses/${address.id}`,{
    address
  })
}

